<?php
include ("headerClean.php");
?>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
 .classification{
    width: 320px;
    height: 130px;
    margin: 5px;
    padding: 10px;
    border: 3px solid;
    border-radius: 25px;
    border-color: rgb(27,173,207);
    background-color: #F4FFFF;
    float: left;
    position: relative;
}

.total
{
    float: left;
    position: relative;
    width: 720px;
}

.questions{
    width: 715px;
    height: 180px;
    position: relative;
    float: left;
}

.description{
    font-size: 12pt;
    text-align: justify;
    color: darkslategrey;
    padding: 5px;
}

textarea#styled
{
    border:3px solid #63f294;
    background-color:white;
    color:#2c137b ;
    font-weight: bold;
    margin-left: 5px;
    background-color: #F4FFF4;
    border-radius: 15px;
}
</style>
    </head>
    <body>
        <form name="FormMsg" method="post">
        <?php
        //i = intern //c = consultant //e = entrepreneur
        
        $typeOfView = $classification; //get here wich view is beeing shown
        $DataBaseWeek = 'week'.$week; //get here wich database is to save (which week is this) //da uma OLHADA
        $userName = $nameUser;  // pegar username aqui
       
        //echo $DataBaseWeek;
 $con = mysql_connect("localhost", "root", "root") or die('Could not connect: '.mysqli_error());
 // $con = mysqli_connect("localhost", "root", "");

  
  $selected = mysql_select_db("alignedvisions", $con) or die("Could not select alignedvisions");        
        
        $question1 = $_POST['msg1'];
        $question2 = $_POST['msg2'];
        $question3 = $_POST['msg3'];
        $question4 = $_POST['msg4'];
        $question5 = $_POST['msg5'];
        $question6 = $_POST['msg6'];
        $question7 = $_POST['msg7'];
        $question8 = $_POST['msg8'];
                    $value1 = null;
                    $value2 = null;
                    $value3 = null;
                    $value4 = null;
                    $value5 = null;
                    $value6 = null;
                    $value7 = null;
                    $value8 = null;
        $state = 'NO';
        $checkExistance = 0;
        
        //accepted is a flag to check YES when the consultant aprove to pass to the next week
        if ($DataBaseWeek == 'week1' || $DataBaseWeek == 'week2' || $DataBaseWeek == 'week3' || $DataBaseWeek == 'week5' || $DataBaseWeek == 'week8')
        {
            $sql="INSERT INTO $DataBaseWeek (username, question1, question2, question3, question4, question5, question6, question7, question8, accepted) 
                  VALUES ('$userName','$question1','$question2','$question3','$question4','$question5','$question6','$question7','$question8', '$state')";
        }
        else if ($DataBaseWeek == 'week4')
        {
            $sql="INSERT INTO $DataBaseWeek (username, question1, question2, question3, question4, question5, question6, question7, question8, accepted) 
                  VALUES ('$userName','$question1','$question2','$question3','$question4','$question5','$state')";
        
        }
        else if ($DataBaseWeek == 'week6' || $DataBaseWeek == 'week10' || $DataBaseWeek == 'week12')
        {
            $sql="INSERT INTO $DataBaseWeek (username, question1, question2, question3, question4, question5, question6, question7, question8, accepted) 
                  VALUES ('$userName','$question1','$question2','$question3','$question4', '$state')";
        
        }
        else if ($DataBaseWeek == 'week7' || $DataBaseWeek == 'week13')
        {
            $sql="INSERT INTO $DataBaseWeek (username, question1, question2, question3, question4, question5, question6, question7, question8, accepted) 
                  VALUES ('$userName','$question1','$question2','$question3','$question4','$question5','$question6','$state')";
        
        }
 

        $checkIFexits="select * from $DataBaseWeek";
        $resultCheck = mysql_query($checkIFexits);
        while ($row = mysql_fetch_array($resultCheck))
        {
            if ($row['username'] === $userName)
            {
                $checkExistance = 1;
                
                if($DataBaseWeek != 'week9' && $DataBaseWeek != 'week11' && $DataBaseWeek != 'week14' && $DataBaseWeek != 'week15')
                {
                    $getMsgs = "select * from $DataBaseWeek where username='$userName'";
                    $resultmsgs = mysql_query($getMsgs);
                    while ($rowMsg = mysql_fetch_array($resultmsgs))
                    {
                        $value1 = $rowMsg['question1'];
                        $value2 = $rowMsg['question2'];
                        $value3 = $rowMsg['question3'];
                        $value4 = $rowMsg['question4'];
                        $value5 = $rowMsg['question5'];
                        $value6 = $rowMsg['question6'];
                        $value7 = $rowMsg['question7'];
                        $value8 = $rowMsg['question8'];
                    }
                }
            }
        }
        
 if(isset($_POST['submitChat']))
 {         
        if($checkExistance == 1)
        {
                $droptable = "DELETE FROM $DataBaseWeek WHERE username = '$userName'";
                $dropresult = mysql_query($droptable);
        }
         $result1 = mysql_query($sql);
        if (!$result1){
              // die ('ERROR: '. mysqli_error($con));
            }
        }
        mysqli_close($con);
        
?>
            <div style =' font-size: 25pt;width: 1180px; height: 50px; text-align: center; color: #63f294 ; padding: 5px;'>
            <?php 
                if($DataBaseWeek == 'week1') echo 'WEEK 1';
                if($DataBaseWeek == 'week2') echo 'WEEK 2';
                if($DataBaseWeek == 'week3') echo 'WEEK 3';
                if($DataBaseWeek == 'week4') echo 'WEEK 4';
                if($DataBaseWeek == 'week5') echo 'WEEK 5';
                if($DataBaseWeek == 'week6') echo 'WEEK 6';
                if($DataBaseWeek == 'week7') echo 'WEEK 7';
                if($DataBaseWeek == 'week8') echo 'WEEK 8';
                if($DataBaseWeek == 'week9') echo 'WEEK 9';
                if($DataBaseWeek == 'week10') echo 'WEEK 10';
                if($DataBaseWeek == 'week11') echo 'WEEK 11';
                if($DataBaseWeek == 'week12') echo 'WEEK 12';
                if($DataBaseWeek == 'week13') echo 'WEEK 13';
                if($DataBaseWeek == 'week14') echo 'WEEK 14';
                if($DataBaseWeek == 'week15') echo 'WEEK 15';
            
            ?></div>
<div style="width: 1180px; height: 1020px">
<div class="total">
<div class="questions" style ="height: 300px;">
<div class="classification" style="width: 320px; height: 260px">
   Video 1
</div>  
<div class="classification" style="width: 320px; height: 260px">
   Video 2
</div>
</div>

<div class="questions">
<?php  
if($DataBaseWeek != 'week9' && $DataBaseWeek != 'week14' && $DataBaseWeek != 'week15')
{
if ($DataBaseWeek != 'week6' && $DataBaseWeek != 'week7' && $DataBaseWeek != 'week10')
{
echo '<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'What is the Entrepreneur’s Mission?';
        if($DataBaseWeek == 'week2')            echo 'Identify the Industry?  Sub Industry?';
        if($DataBaseWeek == 'week3')            echo 'Identify the Economic Structure. Market Share ? ';
        if($DataBaseWeek == 'week4')            echo 'Identify the Management Team? ';
        if($DataBaseWeek == 'week5')            echo 'Research & Development (function & Members)';
        if($DataBaseWeek == 'week8')            echo 'What  image would you associate with the business.';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo '';
        if($DataBaseWeek == 'week11')            echo 'Upload List of Potential Leads:';
        if($DataBaseWeek == 'week12')            echo 'Assess the feasibility of growing the core business?';
        if($DataBaseWeek == 'week13')            echo 'Projected Revenues for Years 1, 2, & 3';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
        echo '</color></div>';
    if ($DataBaseWeek != 'week11'){
        if($typeOfView == 'i')
        {
            echo '<textarea id="styled" rows="5" cols="40" name="msg1"> '.$value1.' </textarea>';
        }
        else
        {
            echo '<textarea id="styled" rows="5" cols="40" name="msg1" readonly> '.$value1.'</textarea>';
        }    
    }
echo '</div> 
<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'What is the Entrepreneur’s Vision?';
        if($DataBaseWeek == 'week2')            echo 'Identify the Industry NAICS code? SIC code?';
        if($DataBaseWeek == 'week3')            echo 'What stage of the Life cycle is the industry in? Explain.';
        if($DataBaseWeek == 'week4')            echo 'Identify the Other Key Players. Possible collaborators';
        if($DataBaseWeek == 'week5')            echo 'Company Infrastructure';
        if($DataBaseWeek == 'week8')            echo 'What color scheme would appeal to the target market.';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo '';
        if($DataBaseWeek == 'week11')            echo '1. Recommend Approach for Lead Generation';
        if($DataBaseWeek == 'week12')            echo 'Assess the feasibility of growing by sub-segmenting customers?';
        if($DataBaseWeek == 'week13')            echo 'Identify List (Expected) of Assets';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
        echo '</color></div>';
    if ($DataBaseWeek != 'week11'){
        if($typeOfView == 'i')
        {
            echo '<textarea id="styled" rows="5" cols="40" name="msg2">'.$value2.' </textarea>';
        }
        else
        {
            echo '<textarea id="styled" rows="5" cols="40" name="msg2" readonly>'.$value2.'</textarea>';
        }    
    }
    
echo '</div> ';
}
 else //if week 6,7,10
{
    echo '<div class="classification" style="margin-top: 50px; width:675px ; height:50px;">
    <div class="description"><color class="dblue">';
        

        if($DataBaseWeek == 'week6')            echo 'Using the information gathered in the internal and external assessment Identify a potential core competency:';
        if($DataBaseWeek == 'week7')            echo 'Based on the external and internal assessments please define the target market using the following criteria:';
        if($DataBaseWeek == 'week10')            echo 'Use the Four P’s to identify the marketing mix:';

        
        echo '</color></div>';   
    
echo '</div> ';
}

echo '</div>';


echo '<div class="questions">
<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week2')            echo 'Detail Economic Outlook? Opportunities vs. Threats?';
        if($DataBaseWeek == 'week3')            echo 'Porters 5: Evaluate the Threats of Substitutes?';
        if($DataBaseWeek == 'week4')            echo 'Identify 3 core values that will support company culture.';
        if($DataBaseWeek == 'week5')            echo 'Production (function & Members)';
        if($DataBaseWeek == 'week6')            echo 'Is it Valuable?';
        if($DataBaseWeek == 'week7')            echo 'Age: Does the product or service appeal to an age';
        if($DataBaseWeek == 'week8')            echo 'Provide a brief tag line';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo 'Focus on SOLUTION instead of Product:';
        if($DataBaseWeek == 'week11')            echo '2. Recommend Approach for Setting Appointments';
        if($DataBaseWeek == 'week12')            echo 'Assess the feasibility of growing adjacent opportunities?';
        if($DataBaseWeek == 'week13')            echo 'Projected Expenses for Years 1, 2, & 3';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
        echo '</color></div>';
    
    if($DataBaseWeek == 'week6'|| $DataBaseWeek == 'week7' || $DataBaseWeek == 'week10')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg1"> '.$value1.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg1" readonly> '.$value1.'</textarea>';
            }  
    }
    else
    {
        if ($DataBaseWeek != 'week11'){
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg3"> '.$value3.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg3" readonly> '.$value3.'</textarea>';
            }    
        }
    }
    
echo '</div> 
<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'What Problem is the entrepreneur trying  to solve?';
        if($DataBaseWeek == 'week2')            echo 'Detail Socio-Cultural Outlook? Opportunities vs. Threats?';
        if($DataBaseWeek == 'week3')            echo 'Porters 5: Evaluate the Threats of New Entrants?';
        if($DataBaseWeek == 'week4')            echo 'Submit a proposed Organizational Chart. (tiered)';
        if($DataBaseWeek == 'week5')            echo 'Information Systems';
        if($DataBaseWeek == 'week6')            echo 'Is it Rare?';
        if($DataBaseWeek == 'week7')            echo 'Socio-economical: How wealthy is our target.';
        if($DataBaseWeek == 'week8')            echo 'What Problem is the entrepreneur trying  to solve? ';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo 'Focus on VALUE instead of Price:';
        if($DataBaseWeek == 'week11')            echo '3. Recommend Approach for Qualifying Prospects';
        if($DataBaseWeek == 'week12')            echo 'Recommend a detailed Strategy considering external/internal factors?';
        if($DataBaseWeek == 'week13')            echo 'Identify List (Expected) of Liabilities';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
        echo '</color></div>';
   
    if($DataBaseWeek == 'week6'|| $DataBaseWeek == 'week7' || $DataBaseWeek == 'week10')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg2"> '.$value2.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg2" readonly> '.$value2.'</textarea>';
            }  
    }
    else
    {
        if ($DataBaseWeek != 'week11'){
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg4">'.$value4.' </textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg4" readonly>'.$value4.' </textarea>';
            }    
        }
    }
    
echo '</div> 
</div> ';


echo '<div class="questions">';
if($DataBaseWeek != 'week12'){
echo '<div class="classification">
    <div class="description"><color class="dblue">';
       
        if($DataBaseWeek == 'week1')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week2')            echo 'Detail Demographic Outlook? Opportunities vs. Threats? ';
        if($DataBaseWeek == 'week3')            echo 'Porters 5: Evaluate the Power of Buyers?';
        if($DataBaseWeek == 'week4')            echo 'Interview Entrepreneur & create brief bio';
        if($DataBaseWeek == 'week5')            echo 'Marketing & Sales  (function & Members)';
        if($DataBaseWeek == 'week6')            echo 'Is it Non-substitutable?';
        if($DataBaseWeek == 'week7')            echo 'Gender: Is the product or service specific to one gender.';
        if($DataBaseWeek == 'week8')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo 'Focus on EDUCATION instead of Promotion:';
        if($DataBaseWeek == 'week11')            echo '4. Recommend Approach for Warming-up Leads (Touches)';
        if($DataBaseWeek == 'week12')            echo '';
        if($DataBaseWeek == 'week13')            echo 'Develop a detailed Budget For Years 1 ,2, & 3';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
        echo '</color></div>';
    
    if($DataBaseWeek == 'week6'|| $DataBaseWeek == 'week7' || $DataBaseWeek == 'week10')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg3"> '.$value3.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg3" readonly> '.$value3.'</textarea>';
            }  
    }
    else
    {    
        if ($DataBaseWeek != 'week11'){
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg5">'.$value5.' </textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg5" readonly>'.$value5.' </textarea>';
            }    
        }
    }

echo '</div>'; 

If ($DataBaseWeek != 'week4')
{
echo '<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week2')            echo 'Detail Regulatory Outlook? Opportunities vs. Threats?';
        if($DataBaseWeek == 'week3')            echo 'Porters 5: Evaluate the Power of Suppliers?';
        if($DataBaseWeek == 'week4')            echo 'Pergunta 4';
        if($DataBaseWeek == 'week5')            echo 'Logistics  (Material Management)';
        if($DataBaseWeek == 'week6')            echo 'Is it costly to imitate?';
        if($DataBaseWeek == 'week7')            echo 'Geography: Where is our target market located.';
        if($DataBaseWeek == 'week8')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo 'Focus on ACCESS instead of Place:';
        if($DataBaseWeek == 'week11')            echo '5. Recommend Approach for Addressing Objections';
        if($DataBaseWeek == 'week12')            echo '';
        if($DataBaseWeek == 'week13')            echo 'Develop a detailed Budget For Years 1 ,2, & 3';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
   echo '</color></div>';

    if($DataBaseWeek == 'week6'|| $DataBaseWeek == 'week7' || $DataBaseWeek == 'week10')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg4"> '.$value4.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg4" readonly> '.$value4.'</textarea>';
            }  
    }
    else
    {   
        if ($DataBaseWeek != 'week11'){
             if($typeOfView == 'i')
             {
                 if($DataBaseWeek != 'week4') echo '<textarea id="styled" rows="5" cols="40" name="msg6">'.$value6.' </textarea>';
                 else echo '<textarea id="styled" rows="5" cols="40" name="msg6" readonly> </textarea>';

             }
             else
             {
                 echo '<textarea id="styled" rows="5" cols="40" name="msg6" readonly> '.$value6.'</textarea>';
             }    

        }
    }
    
echo '</div> ';
If ($DataBaseWeek != 'week6' && $DataBaseWeek != 'week10' && $DataBaseWeek != 'week13')
{
echo '</div>
<div class="questions">
<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week2')            echo 'Detail Technological Outlook? Opportunities vs. Threats? ';
        if($DataBaseWeek == 'week3')            echo 'Porters 5: Evaluate Rivalry within the industry?';
        if($DataBaseWeek == 'week4')            echo 'Pergunta 4';
        if($DataBaseWeek == 'week5')            echo 'Distribution  (function & Members)';
        if($DataBaseWeek == 'week6')            echo '';
        if($DataBaseWeek == 'week7')            echo 'Education: How educated is our target market?';
        if($DataBaseWeek == 'week8')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo '';
        if($DataBaseWeek == 'week11')            echo '6. Recommend Approach for  Closing Sales';
        if($DataBaseWeek == 'week12')            echo '';
        if($DataBaseWeek == 'week13')            echo '';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
       echo ' </color></div>';
   
    if($DataBaseWeek == 'week7')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg5"> '.$value5.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg5" readonly> '.$value5.'</textarea>';
            }  
    }
    else
    {       
        if ($DataBaseWeek != 'week11'){   
            if($typeOfView == 'i')
            {
                if($DataBaseWeek != 'week4') echo '<textarea id="styled" rows="5" cols="40" name="msg7">'.$value7.' </textarea>';
                echo '<textarea id="styled" rows="5" cols="40" name="msg7" readonly> </textarea>';

            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg7" readonly> '.$value7.'</textarea>';
            }    
        }
    }
echo '</div> 
<div class="classification">
    <div class="description"><color class="dblue">';
        
        if($DataBaseWeek == 'week1')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week2')            echo 'Detail Global Outlook? Opportunities vs. Threats?';
        if($DataBaseWeek == 'week3')            echo 'Competitor Analysis using Key Success Factors';
        if($DataBaseWeek == 'week4')            echo 'Pergunta 4';
        if($DataBaseWeek == 'week5')            echo 'Value Chain Matrix ';
        if($DataBaseWeek == 'week6')            echo '';
        if($DataBaseWeek == 'week7')            echo 'Other: Key demographics.  Ie. Married, race, religion';
        if($DataBaseWeek == 'week8')            echo 'Provide a brief Company Overview?';
        if($DataBaseWeek == 'week9')            echo '';
        if($DataBaseWeek == 'week10')            echo '';
        if($DataBaseWeek == 'week11')            echo '7. Recommend Approach for Requesting Referrals';
        if($DataBaseWeek == 'week12')            echo '';
        if($DataBaseWeek == 'week13')            echo '';
        if($DataBaseWeek == 'week14')            echo '';
        if($DataBaseWeek == 'week15')            echo '';
        
       echo ' </color></div>';
    if($DataBaseWeek == 'week7')
    {
            if($typeOfView == 'i')
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg6"> '.$value6.'</textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg6" readonly> '.$value6.'</textarea>';
            }  
    }
    else
    {    
        if ($DataBaseWeek != 'week11'){
            if($typeOfView == 'i')
            {
                if($DataBaseWeek != 'week4')echo '<textarea id="styled" rows="5" cols="40" name="msg8"> '.$value8.'</textarea>';
                else echo '<textarea id="styled" rows="5" cols="40" name="msg8" readonly> </textarea>';
            }
            else
            {
                echo '<textarea id="styled" rows="5" cols="40" name="msg8" readonly>'.$value8.' </textarea>';
            }    
        }
    }
    
echo '</div> ';
}
}
}
}
else
{
        echo '<div class="classification" style="margin-top: 50px; width:675px ; height:90px;">
    <div class="description"><color class="dblue">';
        

        if($DataBaseWeek == 'week14' || $DataBaseWeek == 'week15')            echo 'Final Project: Devise a comprehensive Pitch Deck , which details all the information gathered and assessed over the past 13 weeks. It must be professionally printed, bound, and ready to deliver to potential investors. It must include full citations, high definition images, and any corresponding appendixes. 20 Page Max.';
       if($DataBaseWeek == 'week9')            echo 'Please copy the link bellow into your social media for the Logo Survey. ';
       
        echo '</color></div>';   
    
echo '</div> ';
}
?>
</div>
</div>
<div class="classification" style="width: 420px; height: 350px">
   Video Conference
</div> 

 
<div class="classification" style="height: 584px ; width: 420px; background-color: #F4FFF4; border-color: #63f294;">
    <?php
$chatName = 'chat1'; //abrir o chat correto
$file = 'chats/'. $chatName . '.txt';



$sentence = $_POST['msg'];; 

$current = file_get_contents($file);
$newPost = $userName. ": " . $sentence;
if($sentence)
{
    $current .= "<br>". $newPost . "<br>";
    if(isset($_POST['submitChat']))
    {
        file_put_contents($file, $current, LOCK_EX);

    }
}

    ?>
    <form name="form" method="post">
    <head>
        <link rel="stylesheet" type="text/css" href="FormStyle.css">
        <title>
            Chat
        </title>
    </head>
    <body>
        <div style="margin-left: 5px">   
            
        <color class="dblue">
            <div style="width: 400px; height: 560px;">
                <div class="lblue" style="text-align: center;">
                    <?php 
                    echo 'CHAT';
                    ?>
                </div>
                <div style="overflow: scroll; width: 400px; height: 530px;">
                    <?php 
                    echo $current;
                    ?>
                </div>    
            </div>
        </color>
    <div style="margin-bottom: 10px">
       <?php
       if($typeOfView == 'i' || $typeOfView == 'e')
       {
            echo '<input class="text" style="border-radius: 5px; border-color: rgb(27,173,207); background-color: #F4FFFF;" type="text" name="msg" size="65" maxlength="5000"/>';
       }
       else
       {
           echo '<input class="text" style="border-radius: 5px; border-color: rgb(27,173,207); background-color: #F4FFFF;" type="text" name="msg" size="65" maxlength="5000" readonly/>';
       }

       ?>
        
       <input class="button" name="submitChat" type="submit" value="Send"/> </div></div>
    </body>
    <input style="position: absolute ;background-color:yellow;margin:auto;display:block;margin-top:10%" name="submitPage" type=submit value='Save Page'>
</form>
</div> 
    
</div>
            
    </body>
</html>



<?php
include ("footerPages.php");
?>
    
